<template>
  <div class="my-music" v-if="store.token">
    <page-list-layout>
      <template v-slot:one v-if="isRouterActive">
        <router-view/>
      </template>
      <template v-slot:top>
        <MyMusic/>
      </template>
    </page-list-layout>
  </div>
</template>

<script setup>
import PageListLayout from '@/components/PageListLayout/index.vue'
import MyMusic from './components/MyMusic/index.vue'
import {useStore} from "@/store/index";
import {nextTick, provide, ref} from "vue";
const store = useStore()

// // 页面级依赖注入不会刷新整个页面
const isRouterActive = ref(true)
// 页面级依赖注入不会刷新整个页面
provide('reloadPage', () => {
  isRouterActive.value = false
  nextTick(() => {
    isRouterActive.value = true
  })
})
</script>

<style lang="scss" scoped>

</style>
